package com.xwd.listener;

import javax.servlet.http.HttpSessionActivationListener;
import javax.servlet.http.HttpSessionEvent;

/**
 * @ClassName MySessionActivationListener
 * @Description: com.xwd.listener
 * @Auther: xiwd
 * @Date: 2022/2/13 - 02 - 13 - 2:07
 * @version: 1.0
 */
public class MySessionActivationListener implements HttpSessionActivationListener {

    //methods
    @Override
    public void sessionWillPassivate(HttpSessionEvent se) {
        System.out.println(se.getSession().hashCode()+"即将钝化");
    }

    @Override
    public void sessionDidActivate(HttpSessionEvent se) {
        System.out.println(se.getSession().hashCode()+"即将活化");
    }
}
